package com.dxysun.design.flyweight;

public class Main
{

	/*public static void main(String[] args)
	{
		IFlyweight flyweight = FlyweightFactory.getFlyweight("flyWeight");
		if(flyweight != null)
		{
			flyweight.operation("test");
			flyweight.showInfo("info");
		}
	}*/

	/*public static void main(String[] args)
	{
		String s1 = "hello";
		String s2 = "hello";
		String s3 = "he" + "llo";
		String s4 = "hel" + new String("lo");
		String s5 = new String("hello");
		String s6 = s5.intern();
		String s7 = "h";
		String s8 = "ello";
		String s9 = s7 + s8;
		System.out.println(s1 == s2);//true
		System.out.println(s1 == s3);//true
		System.out.println(s1 == s4);//false
		System.out.println(s1 == s9);//false
		System.out.println(s4 == s5);//false
		System.out.println(s1 == s6);//true
	}*/

	public static void main(String[] args)
	{
		Integer a = Integer.valueOf(100);
		Integer b = 100;
		Integer c = Integer.valueOf(1000);
		Integer d = 1000;

		System.out.println("a==b:" + (a == b));  // a==b:true
		System.out.println("c==d:" + (c == d));  // c==d:false

		Long e = Long.valueOf(12);
	}
}
